package com.li.springbootproject;

import com.lidong.toolkit.constant.LogConst;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.ExitCodeGenerator;
import org.springframework.stereotype.Component;

/**
 * @author LiDong
 * @version 1.0.0
 * @createTime 2/22/2022 8:54 AM
 */
@Component
public class ExitCodeApplication implements ExitCodeGenerator {

    private static final Logger logger = LoggerFactory.getLogger(ExitCodeApplication.class);

    @Override
    public int getExitCode() {
        logger.info(LogConst.LOG_SUCCESS_PREFIX + "容器已经关机...");
        return 999;
    }
}

